package com.open.jack.jk_mpchart;

import android.content.Context;
import android.util.AttributeSet;

import com.github.mikephil.charting.charts.BarChart;
import com.github.mikephil.charting.components.XAxis;

/**
 * @TODO
 * @author: clf
 * @since: 2020/12/24
 */
@Deprecated
public class IotBarChart extends BarChart {
    @Override
    protected void init() {
        super.init();
        setHighlightPerTapEnabled(false);
        getDescription().setEnabled(false);
        mXAxis.setAvoidFirstLastClipping(true);
        mXAxis.setLabelRotationAngle(45f);
        //mXAxis.setAxisMinimum(0f);
        mXAxis.setPosition(XAxis.XAxisPosition.BOTTOM);

        //mXAxisRenderer = new MyXAxisRenderer(mViewPortHandler, mXAxis, mLeftAxisTransformer);
        mAxisRendererLeft = new MyYAxisRenderer(mViewPortHandler, mAxisLeft, mLeftAxisTransformer);

        //mAxisLeft.setAxisMinimum(0f); // this replaces setStartAtZero(true)
        mAxisRight.setEnabled(false);
        mLegend.setEnabled(false);

        setNoDataText(null);
    }
    public IotBarChart(Context context) {
        super(context);
    }

    public IotBarChart(Context context, AttributeSet attrs) {
        super(context, attrs);
    }

    public IotBarChart(Context context, AttributeSet attrs, int defStyle) {
        super(context, attrs, defStyle);
    }
}
